package com.moco.launcher.view;

import android.content.Context;
import android.support.v4.view.PagerAdapter;
import android.util.AttributeSet;
import android.util.Log;

public class OzDirectionalViewPager extends DirectionalViewPager {

	private PagerAdapter adapter;

	private boolean isResetAdapter = false;

	public OzDirectionalViewPager(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	@Override
	public void setAdapter(PagerAdapter adapter) {
		this.adapter = adapter;
		super.setAdapter(adapter);
	}

	public void reSetAdapter(int index) {
		Log.d("PlayFragment", "reSetAdapter===index==" + index);
		isResetAdapter = true;
		super.setAdapter(adapter);
		setCurrentItem(index, false);
	}

	public boolean isResetAdapter() {
		return isResetAdapter;
	}

	public void setResetAdapter(boolean isResetAdapter) {
		this.isResetAdapter = isResetAdapter;
	}

}
